<div class="row">
  <div class="col-md-12">
    <div class="panel">
      <div class="panel-body">
        <%= simple_form_for @object, html: { class: "form-horizontal", role: "form", multipart: true} do |f| %>

          <div class="col-md-12 right">
            <%= image_tag f.object.image.url(:thumb_admin), class: "right" if f.object.image.present? %>
          </div>

          <%= f.input :title, input_html: { class: 'col-md-8' } %>

          <%= f.input :image, input_html: { class: "col-md-6" } %>

          <%= f.input :start_date, as: :string, :input_html => { class: "datetime" } %>

          <%= f.input :end_date, as: :string, :input_html => { class: "datetime" } %>

          <%= f.input :description %>

          <%= f.input :zipcode %>

          <%= f.input :street %>

          <%= f.input :number %>

          <%= f.input :neighborhood %>

          <%= f.input :city %>

          <%= f.input :state %>
          <hr>
          <div class="form-actions">
            <%= f.submit 'Salvar', class: "btn btn-success" %>
            <%= link_to 'Apagar', @object, method: :delete, data: {confirm: 'Tem certeza que deseja remover esse registro?'}, class: 'btn btn-danger' if f.object.persisted? %>
            <%= link_to 'Cancelar', events_path, class: 'btn btn-primary' %>
          </div>
        <% end %>
      </div>
    </div>

  </div>
</div>
